﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace SIAKADCORE.Helpers
{
    public class TripleDesCipherUtility : SymmetricEncryptionUtility
    {
        public TripleDesCipherUtility()
            : base()
        {

        }

        public TripleDesCipherUtility(string salt)
            : base(salt)
        {

        }

        public TripleDesCipherUtility(string password, string salt)
            : base(password, salt)
        {

        }

        public override string Encrypt(string plaintext)
        {
            return CipherUtility.Encrypt<TripleDESCryptoServiceProvider>(plaintext, this.password, this.salt);
        }

        public override string Decrypt(string encryptedText)
        {
            return CipherUtility.Decrypt<TripleDESCryptoServiceProvider>(encryptedText, this.password, this.salt);
        }
    }
}
